package com.siqi.hr.system.common.service;

import com.siqi.hr.system.common.dao.intf.RecyclebinDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * 处理回收站通用service层
 * @version 2016-08-18
 * @author xiaogq
 * @since JDK1.8.0_12, Spring3.0.2
 */
@Service("recyclebinService")
@Transactional(rollbackFor = { Exception.class }, propagation = Propagation.REQUIRED)
public class RecyclebinService {

    @Autowired
    private RecyclebinDao recyclebinDao;

    public boolean recyclebinHandel(Integer entity_id, String records, Integer code) {
        int counts = recyclebinDao.recyclebinHandel(entity_id, records, code);
        return counts > 0;
    }

}
